<div class="add">
	<form action="<?php echo url('banner/edit');?>" method="post" id="editForm">
		<table>
			<tr>
				<td align="right">banner分类:</td>
				<td align="left">
					<select name="banner[typeID]">
						<option <?php if($image['typeID']==service_type::BANNER) echo 'selected="selected"';?> value="<?php echo service_type::BANNER;?>">
							<?php echo service_type::getName(service_type::BANNER);?>
						</option>
						<option <?php if($image['typeID']==service_type::SLIDE) echo 'selected="selected"';?> value="<?php echo service_type::SLIDE;?>">
							<?php echo service_type::getName(service_type::SLIDE);?>
						</option>
					</select>
				</td>
			</tr>
			<tr>
				<td align="right">banner图片:</td>
				<td align="left"><?php echo fetch('uploadImg');?></td>
			</tr>
			<tr>
				<td align="right">链接地址:</td>
				<td align="left"><input type="text" name="banner[url]" value="<?php echo $image['url'];?>" rows="4" cols="100" /></td>
			</tr>
			<tr>
				<td colspan="2" align="right"><input type="submit" value="修改" id="catesub" /></td>
			</tr>
			<input type="hidden" name="id" value="<?php echo $image['id'];?>" />
		</table>
	</form>
</div>
<script type="text/javascript">
$(document).ready(function(){	
	submitForm("#editForm",{
		dataType:'json',
		success:function(data){
				if(data.i=='ok'){
					location.href="<?php echo url('banner/index');?>";
				}else{
					alert(data.i);
				}
			},
	});
});
</script>
